CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )

SET( PROJECT_NAME_TEMP XiolTest )

IF( XiolLib_SOURCE_DIR )

	PROJECT( ${PROJECT_NAME_TEMP} )

	INCLUDE( "${XiolLib_SOURCE_DIR}/FindXInput.cmake" )
#	MESSAGE("XINPUT:")
#	MESSAGE("Found:	${XINPUT_FOUND}")
#	MESSAGE("Include: ${XInput_INCLUDE_DIR}")
#	MESSAGE("Lib: ${XInput_LIBRARY}")

	ADD_DEFINITIONS( -DUNICODE -D_UNICODE )		

	INCLUDE_DIRECTORIES( ${XiolLib_SOURCE_DIR} ${XInput_INCLUDE_DIR} )

	SET	(	SOURCES
			Main.cpp
		)
	ADD_EXECUTABLE( ${PROJECT_NAME} ${SOURCES} )
	TARGET_LINK_LIBRARIES( ${PROJECT_NAME} XiolLib ${XInput_LIBRARY})

ELSE()
	
	MESSAGE("Can't find XiolLib. Project ${PROJECT_NAME_TEMP} won't be compiled")

ENDIF()
	
